package org.example.aspect;

import org.aopalliance.intercept.Joinpoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

public class LoggingAspect {
    @Pointcut("execution(* org.example.servive.UserService.*(..))")
    public  void userPoint(){}
    @Before("userPoint()")
    public void  before(Joinpoint joinpoint) {
        System.out.println("系统检测权限");
    }
    @After("userPoint()")
    public void later(Joinpoint joinpoint) {
        System.out.println("记录操作日志");
    }
}

